<template>
    <div>
        {{ a }}
        <button @click="changeVal">change</button>
    </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'

const props = defineEmits(['a', 'b', 'name', 'obj'])
const emit = props['$emit']

onMounted(() => {
    console.log(props('a'))
})

function changeVal() {
    emit('changeMan', 'tom')
}
</script>

<style scoped></style>